|
|
|
|
|
|
|
not. With an MDI application, you can easily organize all the child forms or minimize the entire group of forms just by minimizing the parent form. Programs such as Microsoft Word and Excel are examples of MDI applications. If you have worked with these programs, you know that you can open multiple windows in the program, access them easily from the menu, and minimize the whole thing with a single click of the mouse. In version 5, even Visual Basic itself went to a true MDI interface style. Figure 17.2 shows three blank workbooks opened simultaneously in Excel as an example of a typical MDI application. |
|
|
|
|
|
|
|
|
Figure 17.2
MDI applications let you manage multiple document windows with ease. |
|
|
|
|
|
|
|
|
Characteristics of MDI Parent Forms |
|
|
|
|
|
|
|
|
The MDI form, also known as the parent form, is the container for all the child forms of the application. The MDI form has a number of characteristics that define its behavior: |
|
|
|
|
|
|
|
|
An application can have only one MDI form. |
|
|
|
|
|
|
|
|
The MDI form can contain only those controls that support the Align property, such as the PictureBox or Toolbar controls. You cannot place other controls on the MDI form. |
|
|
|
|
|
|
|
|
You cannot use the Print method or any of the graphics methods to display information on the MDI form. |
|
|
|
|
|
|
|
|
The MDI parent window and all child windows are represented by a single icon on the Windows taskbar. If the parent form is minimized and then restored, all the child forms are returned to the same layout as they had before the application was minimized. |
|
|
|
|
|
|
|
|
If a menu is defined for a child form, the menu is displayed in the parent form's menu bar. If a menu is defined for the parent form, it is not shown at all if a child form that has its own menu is the active form. |
|
|
|
|
|